# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Sanpi <sanpi+aur@homecomputing.fr>

pkgname=routino
pkgver=3.3.3
pkgrel=1
pkgdesc='Router for OpenStreetMap Data'
arch=('loong64' 'x86_64')
url='https://www.routino.org/'
license=('AGPL3')
depends=('zlib' 'bzip2')
source=(https://www.routino.org/download/$pkgname-$pkgver.tgz)
sha256sums=('abd82b77c314048f45030f7219887ca241b46d40641db6ccb462202b97a047f5')

prepare() {
  cd "$pkgname-$pkgver"

#paths fix
  sed -i 's|prefix=/usr/local|prefix=/usr|' Makefile.conf
  sed -i 's|/doc/routino|/share/doc/routino|' Makefile.conf

#RPATH fix
  sed -i 's|LDFLAGS_LDSO=-Wl,-R.||' Makefile.conf
}

build() {
  cd "$pkgname-$pkgver"

  make
}

package() {
  cd "$pkgname-$pkgver"

  make DESTDIR="${pkgdir}" install
}
